From 492da27a3edd9064937007d5d373ffc4f9bc6ff5 Mon Sep 17 00:00:00 2001 From: Matthew Daley Date: Wed, 30 Oct 2013 20:51:46 +1300 Subject: [PATCH] libxc: initalize stdio loggers' progress_last_percent values to 0 ...otherwise they are undefined in the first progress callback. Coverity-ID: 1056055 Signed-off-by: Matthew Daley Reviewed-by: Andrew Cooper Acked-by: Ian Campbell --- tools/libxc/xtl_logger_stdio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/libxc/xtl_logger_stdio.c b/tools/libxc/xtl_logger_stdio.c index 2e73c862b9..aa5501f98f 100644 --- a/tools/libxc/xtl_logger_stdio.c +++ b/tools/libxc/xtl_logger_stdio.c @@ -172,6 +172,7 @@ xentoollog_logger_stdiostream *xtl_createlogger_stdiostream if (newlogger.flags & XTL_STDIOSTREAM_SHOW_DATE) tzset(); newlogger.progress_erase_len = 0; + newlogger.progress_last_percent = 0; return XTL_NEW_LOGGER(stdiostream, newlogger); } -- 2.30.2